package shark.scheduler.spi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import shark.scheduler.spi.entity.ScheduledCron;

import java.util.List;

@Mapper
public interface ScheduledCronMapper extends BaseMapper {

    void addScheduledCron(@Param("task") ScheduledCron scheduledCron);

    List<ScheduledCron> findAll();

    ScheduledCron findByKey(@Param("taskKey") String taskKey);

    void updateStatusByCronKey(@Param("taskKey") String taskKey, @Param("status") Integer status);

}
